﻿using System.Web.Mvc;

namespace ASPNETMVCApplication.Areas.Supp
{
    /// <summary>
    /// Shopping area routing registration class.
    /// </summary>
    public class SupplierAreaRegistration : AreaRegistration
    {
        /// <summary>
        /// The area name: Shop.
        /// </summary>
        public override string AreaName
        {
            get { return "Supp"; }
        }

        /// <summary>
        /// Registers Shopping specific routes.
        /// Note: the order in which routes are registered is important!
        /// </summary>
        /// <param name="context">The registration context.</param>
        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(null, "supp/supplier", new { controller = "Supplier", action = "Index" });
            context.MapRoute(null, "supp/supplier/register", new { controller = "Supplier", action = "Register" });
            context.MapRoute(null, "supp/supplier/LogOut", new { controller = "Supplier", action = "LogOut" });
            context.MapRoute(null, "supp/supplier/login", new { controller = "Supplier", action = "Login" });
            context.MapRoute(null, "supp/Employee/Eregister", new { controller = "Employee", action = "ERegister" });
            context.MapRoute(null, "supp/Traffic/Tregister", new { controller = "Traffic", action = "TRegister" });
            context.MapRoute(null, "supp/Ticket/TicketPost", new { controller = "Ticket", action = "TicketPost" });
            context.MapRoute(null, "supp/Product/SearchCategory", new { controller = "Product", action = "SearchCategory" });
            context.MapRoute(null, "supp/Product/UpdatePrice", new { controller = "Product", action = "UpdatePrice" });
            //context.MapRoute(null, "shop/cart/shipping", new { controller = "Shop", action = "Shipping" });
            //context.MapRoute(null, "shop/cart", new { controller = "Shop", action = "Cart" });

            context.MapRoute(
                "Supp_default",
                "Supp/{controller}/{action}/{id}",
                new { action = "Index", id = "" }
            );
        }
    }
}
